home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / programm.ing / winlib.lzh / WINLIB / WINLIB.H < prev    next >
Encoding:
C/C++ Source or Header  |  1994-04-05  |  36.6 KB  |  875 lines

  1. /********************************************************************
  2.  *                                                                  *
  3.  *    WinLIB PRO header file                                          *
  4.  *                                                                  *
  5.  *    The ULTIMATE Object-Oriented programming library available for  *
  6.  *    the C language on the Atari platform of computers.              *
  7.  *                                                                  *
  8.  *    Combines ideas from Enhanced GEM, Compact GEM, GEM++, WindClass,*
  9.  *    Application Library, Windows 3.1, Windows 4.0, Motif, Openlook, *
  10.  *    NeXTDesk, MultiTOS, Geneva, InterFace (EXTOBFIX), XAES, XAES    *
  11.  *    PRO, WAZ Text Library, Window Extensions (WinX), Mag!x, and     *
  12.  *    WX_LIB                                                          *
  13.  *                                                                  *
  14.  *    Combines interface designs from InterFace, MultiTOS, Geneva,    *
  15.  *    NeXT, WindDesk, Windows 3.1, OS/2, and MultiWIN.                *
  16.  *                                                                  *
  17.  *    Copyright (c) Clever Bits and Bitgate Software 1992 - 1994      *
  18.  *    All Rights Reserved.                                            *
  19.  *                                                                  *
  20.  *    Programmed by Ken Hollis (khollis@bitsink.gbdata.com)           *
  21.  *                  Karl Ã˜ygard (karlo@ifi.uio.no)                    *
  22.  *              and Markus Gutschke (gutschk@uni-muenster.de)         *
  23.  *                                                                  *
  24.  *    Program start date: 22.12.1992                                  *
  25.  *    Program end date  : 01.12.1994 (Estimated)                      *
  26.  *    Language          : Non-ANSI C                                  *
  27.  *    Compatibility     : Pure C, Turbo C                             *
  28.  *    Required system   : Atari 520ST, 512K, TOS 1.0                  *
  29.  *                                                                  *
  30.  ********************************************************************/
  31.  
  32. #include <aes.h>
  33. #include <vdi.h>
  34.  
  35. #ifndef    __WINLIB__
  36. #define    __WINLIB__            /* WinLIB PRO Header file identifier */
  37. #define    __WLVER__    0x0060    /* WinLIB PRO Current Version */
  38. #endif
  39.  
  40. #ifndef min
  41. #define min(a,b)    ((a) < (b) ? (a) : (b))    /* Minimum value */
  42. #define max(a,b)    ((a) > (b) ? (a) : (b))    /* Maximum value */
  43. #endif
  44.  
  45. #ifndef GLOBAL
  46. #define GLOBAL
  47. #define LOCAL    static
  48. #endif
  49.  
  50. #ifndef BOOL
  51. #define    BOOL    int
  52. #endif
  53.  
  54. #ifndef    UnusedVar
  55. #define    UnusedVar(x) ((void)(x))
  56. #endif
  57.  
  58. #define AES_VERSION        _GemParBlk.global[0]    /* Version of AES */
  59.  
  60. #ifndef AP_DRAGDROP
  61. #define    AP_DRAGDROP    63
  62. #endif
  63.  
  64. /* Atari's section for Drag-and-drop */
  65. #define    DD_OK            0    /* Information was handled */
  66. #define DD_NAK            1    /* Cannot process information */
  67. #define DD_EXT            2    /* Don't understand this file type */
  68. #define DD_LEN            3    /* File length is too large */
  69. #define DD_TRASH        4    /* Dropped on to trashcan */
  70. #define DD_PRINTER        5    /* Dropped on to printer */
  71. #define DD_CLIPBOARD    6    /* Dropped on to clipboard */
  72.  
  73. /* Milliseconds to wait before timeout */
  74. #define DD_TIMEOUT        4000
  75.  
  76. /* Number of bytes of "preferred extensions" sent by receipient
  77.  * during open */
  78. #define DD_NUMEXTS    8
  79. #define DD_EXTSIZE    32L
  80.  
  81. /* Max size of a drag-and-drop item name */
  82. #define DD_NAMEMAX    128
  83.  
  84. /* Max length of a drag-and-drop drop header */
  85. #define DD_HDRMAX    (8+DD_NAMEMAX)
  86.  
  87. #define WM_CREATED        24893    /* Successful creation */
  88. #define WM_KILL            24894    /* Window about to be killed */
  89. #define WM_DIALOG        24895    /* Dialog action */
  90. #define WM_KEYBD        24896    /* Key press */
  91. #define WM_BUTTON        24897    /* Button press */
  92. #define    WM_TEXT            24898    /* Hottext selection */
  93. #define    WM_HOTKEY        24899    /* Hotkey selection */
  94. #define    WM_FKEY            24900    /* Function key selection */
  95. #define    WM_HELP            24901    /* Help key selection */
  96. #define    WM_UNDO            24902    /* Undo key selection */
  97. #define    WM_KBRESET        24903    /* Keyboard reset (TOS 1.0-1.2) */
  98. #define    WM_MENU            24904    /* Menu selection */
  99. #define    WM_PAINT        24905    /* Paint rectangle after redraw */
  100. #define    WM_TIMER        24906    /* Do timer action */
  101. #define    WM_TIMECHG        24907    /* Timer mode change */
  102. #define    WM_ICONIFIED    24908    /* Window iconified */
  103. #define    WM_UNICONIFIED    24909    /* Window uniconified */
  104. #define    WM_CLEARBUF        24999    /* Clear message buffer */
  105.  
  106. #define WC_NOTOBJECTABLE    0    /* Window can be closed w/o asking */
  107. #define WC_OBJECTABLE        1    /* Pause before closing window */
  108. #define    WC_FORCED            2    /* Force window to be closed */
  109.  
  110. /* Extended Object Types */
  111. #define SCALE            16        /* Automatic scaling of image */
  112. #define    FLYING            17        /* Flying dialog mover */
  113. #define CUSTOM            18        /* Custom arrow buttons */
  114. #define    CHECKBOX        CUSTOM    /* "X" Selectable box */
  115. #define    RADIOBTN        CUSTOM    /* Radio button circle cell */
  116. #define    POPUPBTN        CUSTOM    /* Popup button type */
  117. #define UNDERLINE        19        /* Underlined text */
  118. #define    BOXFRAME        20        /* Box frame for selections */
  119. #define    BOXTITLE        20        /* Box frame for selections */
  120. #define    HELPBTN            21        /* Activation button under [HELP] */
  121. #define    CYCLEBTN        22        /* Cycle button for popup menus */
  122. #define    CIRCLE            22        /* Cycle button for popup menus */
  123. #define    CUSTBTN            24        /* Custom Selection and Radio boxes */
  124. #define    DROPDOWN        25        /* Dropdown button for dropdown selections */
  125. #define    MENUDETATCH        30        /* Detatchable menu bar */
  126. #define    UNDOBTN            31        /* Activation button under [UNDO] */
  127. #define    MENULINE        40        /* Thick line for separator */
  128. #define    MENUEFFECTS        41        /* Menu item effects */
  129.  
  130. /* Window handles - GLOBAL */
  131. #define    DESKTOP            0        /* Desktop window handle */
  132.  
  133. /* Standard Extended Object Flags */
  134. #ifdef OBFLAGS11                /* (New AES bindings available?) */
  135. #define HANDSLIDE        OBFLAGS12    /* Hand shown for slider */
  136. #define MENUSIDE        OBFLAGS13    /* Menu with side items */
  137. #define    BOXFRAMETITLE    OBFLAGS15    /* Box frame title with box around it */
  138. #else
  139. #define    HANDSLIDE        0x0800        /* See above */
  140. #define    MENUSIDE        0x2000
  141. #define    BOXFRAMETITLE    0x8000
  142. #endif
  143.  
  144. /* Standard Extended Object States */
  145. #ifdef OBSTATE15                /* New AES bindings available? */
  146. #define    MENUTYPE    OBSTATE13    /* Object is a menu title */
  147. #define    ALREADYMOD    OBSTATE14    /* Already modified for sizing (temporary state) */
  148. #define    FAKED3D        OBSTATE15    /* Faked 3D setting for Falcon */
  149. #else
  150. #define    MENUTYPE    0x2000        /* See above */
  151. #define    ALREADYMOD    0x4000
  152. #define    FAKED3D        0x8000
  153. #endif
  154.  
  155. #ifndef DRAW3D
  156. #define    DRAW3D        0x0080        /* MultiTOS/Falcon Draw3D setting */
  157. #endif
  158.  
  159. /* Extended/Enhanced Boolean values.  These are supported by Atari. */
  160. #define TRUE            1    /* Boolean TRUE */
  161. #define FALSE            0    /* Boolean FALSE */
  162. #define FAIL            -1    /* Boolean FAIL */
  163. #define    INTERNALFAIL    -2    /* Boolean NON-Recoverable FAIL */
  164. #define NOMORE        FAIL    /* Window open failure (no more wins) */
  165.  
  166. /* Text movement (for text routines) */
  167. #define    TEXT_UP            -1    /* Text moved up */
  168. #define    TEXT_DOWN        1    /* Text moved down */
  169.  
  170. /* Scaling settings */
  171. #define NO_SCALING        0    /* No scaling is done */
  172. #define SCALING            1    /* All/complete scaling is performed */
  173. #define TEST_SCALING    2    /* Icon mask scaling is done */
  174. #define DARK_SCALING    4    /* Icon data scaling is done */
  175.  
  176. /* Window states (oh, there's just TOO many states!) */
  177. #define W_OPEN                0x01    /* Window is currently opened */
  178. #define W_MINIMIZED         0x02    /* Window is minimized */
  179. #define W_UNUNTOPPABLE        0x04    /* Window cannot be untopped */
  180. #define W_FULLERMINIMIZES    0x08    /* Window fuller box minimizes */
  181. #define W_BEVENT            0x10    /* Window accepts bkgnd clicks */
  182. #define W_MODAL                0x20    /* Window is modal */
  183. #define    W_FLYING            0x40    /* Window is a flying dialog */
  184. #define    W_TEXT                0x80    /* Window is a text window */
  185. #define    W_ICONIFIED            0x0100    /* Window is iconified */
  186. #define    W_FULLERICONIFIES    0x0200    /* Window fuller box iconifies */
  187. #define    W_TIMER                0x0400    /* Window is a timer */
  188. #define    W_DIALOG            0x0800    /* Window is a dialog */
  189. #define    W_DESKTOP            0x1000    /* Window is the desktop */
  190. #define    W_FULLERCHOOSES        0x2000    /* Window fuller box chooses new state */
  191. #define    W_RESERVED1            0x4000    /* Reserved */
  192. #define    W_RESERVED2            0x8000    /* Reserved */
  193.  
  194. /* Window styles */
  195. #define    S_FULLERMINIMIZES    0x0001    /* Fuller box minimizes window */
  196. #define    S_FULLERICONIFIES    0x0002    /* Fuller box iconifies window */
  197. #define    S_FULLERCHOOSES        0x0004    /* Fuller box chooses either one */
  198. #define    S_MULTICOPYABLE        0x0008    /* All windows containing this same tree will be drawn if an action occurs */
  199. #define    S_RESERVED0            0x0010
  200. #define    S_RESERVED1            0x0020
  201. #define    S_RESERVED2            0x0040
  202. #define    S_RESERVED3            0x0080
  203. #define    S_RESERVED4            0x0100
  204. #define    S_RESERVED5            0x0200
  205. #define    S_RESERVED6            0x0400
  206. #define    S_RESERVED7            0x0800
  207. #define    S_RESERVED8            0x1000
  208. #define    S_RESERVED9            0x2000
  209. #define    S_RESERVED10        0x4000
  210. #define    S_RESERVED11        0x8000
  211.  
  212. /* Quick window states.  This is used when calling WCreateWindow,
  213.    and it's the first element used when calling it. */
  214. #define    W_DIALOGICON        W_OPEN | W_DIALOG | W_BEVENT | W_FULLERICONIFIES
  215. #define    W_DIALOGMINI        W_OPEN | W_DIALOG | W_BEVENT | W_FULLERMINIMIZES
  216. #define W_ALERT                W_OPEN | W_FULLERMINIMIZES | W_UNUNTOPPABLE | W_DIALOG | W_MODAL
  217. #define    W_DIALOGCHOOSE        W_OPEN | W_DIALOG | W_BEVENT | W_FULLERCHOOSES
  218. #define W_ALERTCHOOSE        W_OPEN | W_FULLERCHOOSES | W_UNUNTOPPABLE | W_DIALOG | W_MODAL
  219. #define    W_FLYINGWIN            W_OPEN | W_DIALOG | W_FLYING | W_BEVENT
  220. #define    W_TEXTWIN            W_OPEN | W_TEXT
  221.  
  222. /* Quick window styles.  This will be modified soon. */
  223. #define    S_COPYABLE            S_MULTICOPYABLE
  224.  
  225. /* Window TYPE attributes */
  226. #define    W_TEXT_ATTRIBUTES    NAME|CLOSER|FULLER|MOVER|SIZER|UPARROW|DNARROW|VSLIDE
  227. #define    W_MOVE_ATTRIBUTES    NAME|MOVER
  228. #define    W_DIAINF_ATTRIBUTES    NAME|CLOSER|FULLER|MOVER|INFO
  229. #define    W_FLYING_ATTRIBUTES    0
  230.  
  231. /* Window creation types. */
  232. #define WF_MINIMIZE         24890    /* Minimizable window */
  233. #define WF_UNUNTOPPABLE        24891    /* Cannot untop window */
  234. #define WF_MODAL            24892    /* Modal dialog box */
  235. #define    WF_ICONIFYWL        24893    /* Iconifiable window */
  236. #define    WF_FLYING            24894    /* Flying Dialog window */
  237. #define    WF_TEXT                24895    /* Text window */
  238. #define    WF_TIMER            24896    /* Timer window */
  239. #define    WF_DIALOG            24897    /* Dialog window */
  240. #define    WF_CUSTOMWIN        24898    /* Customized window */
  241.  
  242. /* Timer status modes.  The PAUSED and RESUMED modes are not yet
  243.    functioning, because we don't have multiple timer access yet.
  244.    These are passed in msg_buf[4]. */
  245. #define T_STOPPED    0                    /* Timer stopped */
  246. #define T_RUNNING    1                    /* Timer running */
  247. #define    T_PAUSED    T_STOPPED            /* Timer "paused" */
  248. #define    T_RESUMED    T_RUNNING            /* Timer resumed */
  249. #define    T_ALLSTOP    2                    /* All timers stopped */
  250. #define    T_ALLRUN    3                    /* All timers running */
  251. #define    T_ALLPAUSE    T_ALLSTOP            /* All timers "paused" */
  252. #define    T_ALLRESUME    T_ALLRUN            /* All timers resumed */
  253.  
  254. /* Hotkey indeces.  This changes the style of the hotkey activator
  255.    keys.  Since we "hack" the character to activate in the upper 8
  256.    bits, these can be set to change the style to activate that key. */
  257. #define    HOTKEY_NONE            0            /* NO Hotkeys */
  258. #define    HOTKEY_UNDERLINE    1            /* Hotkeys are underlined */
  259. #define    HOTKEY_RED            2            /* Hotkeys are RED */
  260. #define    HOTKEY_INVERSE        3            /* Hotkeys are inverted */
  261.  
  262. /* Box fill types for selectable "side" items.  These will probably
  263.    be removed...  I don't see a use for them.  Maybe I can add a
  264.    "WS_COLOR" for Color Icons when we get them installed. */
  265. #define    WS_BOXED    1
  266. #define    WS_XED        2
  267. #define    WS_COMBO    3
  268.  
  269. /* Hottext types. */
  270. #define    HT_NONE        0        /* No difference in drawing style */
  271. #define    HT_BOLD        1        /* Boldfaced text */
  272. #define    HT_LIGHT    2        /* Lightened text */
  273. #define    HT_ITALICS    4        /* Italicized text */
  274. #define    HT_ULINE    8        /* Underlined text */
  275. #define    HT_OUTLINE    16        /* Outlined text */
  276.  
  277. /* Dialog flag types.  These will probably be replaced by FL3DBAK,
  278.    FL3DIND, and FL3DACT. */
  279. #define    F_3DBIT_1    0x200    /* 3D Background bit */
  280. #define    F_3DBIT_2    0x400    /* 3D Foreground bit */
  281. /* Both of the above two bits enabled is a 3D Activation object */
  282.  
  283. /* 3D Internal Drawing Types.  Yay!  Our 3D types.  Notice, there's
  284.    *SIX* different styles, and each one takes up only 2.3K for
  285.    overhead...  Not bad if I say so myself.  (MultiTOS's 3D routines
  286.    take up 45K overhead!) */
  287. #define    L_MULTITOS    0    /* MultiTOS / TOS 4.04+ look */
  288. #define    L_CUSTOM    1    /* Olaf Meisiek's Zoom! look */
  289. #define    L_MOTIF        2    /* XWindows/Motif look (X11R5) */
  290. #define    L_GENEVA    3    /* Geneva's MultiTOS (modified) look */
  291. #define    L_WINLIB    4    /* WinLIB Pro's own custom look */
  292. #define    L_STANDARD    5    /* Standard look for normal TOS (no 3D) */
  293.  
  294. /* Window slider bar/arrow messages in plain english.  These are
  295.    variants on the Pure C indices, this is just easier to read. */
  296. #define    PAGE_UP            0    /* Page up selected */
  297. #define    PAGE_DOWN        1    /* Page down selected */
  298. #define    LINE_UP            2    /* Line up selected */
  299. #define    LINE_DOWN        3    /* Line down selected */
  300. #define    PAGE_LEFT        4    /* Page left selected */
  301. #define    PAGE_RIGHT        5    /* Page right selected */
  302. #define    COLUMN_LEFT        6    /* Column left selected */
  303. #define    COLUMN_RIGHT    7    /* Column right selected */
  304.  
  305. /* Mouse forms.  These are the custom mouse forms that are called with
  306.    WGrafMouse.  These are currently used for the custom windows (will
  307.    be used) and for loading and initializing stuff.. */
  308. #define    INIT_MOUSE        50    /* Computer-type mouse */
  309. #define    LOAD_MOUSE        51    /* Resource mouse */
  310. #define    LRSLIDE_MOUSE    52    /* Left/right slider */
  311. #define    UDSLIDE_MOUSE    53    /* Up/down slider */
  312. #define    URMOVE_MOUSE    54    /* Upper-right sizer */
  313. #define    ULMOVE_MOUSE    55    /* Upper-left sizer */
  314. #define    LLMOVE_MOUSE    56    /* Lower-left sizer */
  315. #define    LRMOVE_MOUSE    57    /* Lower-right sizer */
  316. #define    CLIP_MOUSE        58    /* Clipboard mouse */
  317. #define    DIALOG_MOUSE    59    /* Dialog box mouse */
  318. #define    TEXT_MOUSE        60    /* Text mouse */
  319. #define    TIMER_MOUSE        61    /* Timer mouse */
  320. #define    TRASH_MOUSE        62    /* Trashcan mouse */
  321. #define    ANIMATED_MOUSE    300    /* Animated mouse */
  322. #define    COLOR_MOUSE        301    /* Colour mouse (yeah right...  Do THAT legally) */
  323.  
  324. /* Mouse form tools.  This is for mouse animation, and for other
  325.    tools if the programmer wants to store mouse shapes from loading
  326.    in from memory, or if they create a mouse tool.  Very handy. */
  327. #define    GET_MOUSE        400    /* Get current mouse form index */
  328. #define    SAVE_MOUSE        401    /* Save current mouse form index */
  329. #define    PREV_MOUSE        402    /* Get previous mouse form index */
  330. #define    NEXT_MOUSE        403    /* Get next mouse form index */
  331. #define    FIRST_MOUSE        404 /* Get first mouse form index */
  332. #define    LAST_MOUSE        405    /* Get last mouse form index */
  333. #define    CLEAR_MOUSE        406    /* Clear all mice indices */
  334. #define    FIND_MOUSE        407    /* Find mouse form index */
  335. #define    NEWPOS_MOUSE    408    /* Reposition counter */
  336.  
  337. /* WAppl_GetInfo indices. These are essentially the same indices that
  338.    are used in TOS 4.04, just varied a bit.  We added our own "spice"
  339.    to it, so it works with WinLIB PRO and ALL versions of TOS. */
  340. #define    APGI_REGFONT    0    /* Regular font information */
  341. #define    APGI_SMFONT        1    /* Small font information */
  342. #define    APGI_COLORS        2    /* Resolution and color information */
  343. #define    APGI_LANGUAGE    3    /* Language information */
  344. #define    APGI_ENVIRON1    4    /* Environment #1 */
  345. #define    APGI_ENVIRON2    5    /*       .     #2 */
  346. #define    APGI_ENVIRON3    6    /*       .     #3 */
  347. #define    APGI_RESVD1        7    /* Reserved for OS usage */
  348. #define    APGI_MOUSE        8    /* Mouse support information */
  349. #define    APGI_MENU        9    /* Menu support information */
  350. #define    APGI_SHEL        10    /* Shel_write information */
  351. #define    APGI_WINDOW        11    /* Extended WF_ support information */
  352. #define    APGI_MESSAGE    12    /* Extended message information */
  353. #define    APGI_OBJLIB        13    /* Object library information */
  354. #define    APGI_FORMLIB    14    /* Form library information */
  355. #define    APGI_WLGETINFO    -1    /* Get WinLIB PRO information (general) */
  356.  
  357. /* Search element names for WLocateWindow.  This makes it easy for
  358.    routines and the programmer to find a window that has this info
  359.    inside it.  WLocateWindow only stops at the first window it finds,
  360.    but that will change soon. */
  361. #define    SHANDLE            'HNDL'    /* AES Window Handle */
  362. #define    SSTATE            'STAT'    /* Window state (W_OPEN, etc) */
  363. #define    SKIND            'KIND'    /* Window kind */
  364. #define    SEDITOBJECT        'EOBJ'    /* Starting edit object */
  365. #define    SEDITPOS        'EPOS'    /* Cursor position inside edit object */
  366. #define    SHASEDIT        'HASE'    /* If window has an editable object */
  367. #define    SEDITDISP        'EDSP'    /* If the cursor is displayed */
  368. #define    STOPLINE        'TPLN'    /* Top line of text (current position) */
  369. #define    SAMOUNTMOVED    'AMTM'    /* Amount of text moved */
  370. #define    STOPPOINTER        'TOP_'    /* Top pointer of text */
  371. #define    STREE            'TREE'    /* Find window with OBJECT TREE */
  372. #define    SICON            'ICON'    /* Find window with icon number */
  373.  
  374. /* Dominance settings for windows */
  375. #define    D_NONE            0        /* No dominance (not W_UNUNTOPPABLE) */
  376. #define    D_ALWAYSTOP        1        /* Always on top, no matter what */
  377. #define    D_SWITCHABLE    2        /* Can switch between W_UNUNTOPPABLEs */
  378. #define    D_NOTTOPPABLE    3        /* Window cannot be topped or used */
  379.  
  380. /* Define XACC Messages */
  381. #ifndef ACC_ID
  382. #define ACC_ID        0x400        /* Get Accessory ID */
  383. #define ACC_OPEN    0x401        /* Open accessory */
  384. #define ACC_CLOSE    0x402        /* Close accessory */
  385. #define ACC_ACC        0x403        /* Accessory accessed */
  386. #define ACC_EXIT    0x404        /* Accessory exited */
  387. #define ACC_ACK        0x500        /* Acknowledgement */
  388. #define ACC_TEXT    0x501        /* Text send */
  389. #define ACC_KEY        0x502        /* Keyboard send */
  390. #define ACC_META    0x503        /* Metafile send */
  391. #define ACC_IMG        0x504        /* Image send (Color or B/W) */
  392. #endif
  393.  
  394. /* Edit validation string check return values */
  395. #define    E_NUMERIC        1
  396. #define    E_UP_ASCII        2
  397. #define    E_LOW_ASCII        3
  398. #define    E_UP_NUMERIC    4
  399. #define    E_LOW_NUMERIC    5
  400. #define    E_UP_PATH        6
  401. #define    E_LOW_PATH        7
  402. #define    E_ANY            8
  403. #define    E_SPECIAL        9
  404.  
  405. typedef struct hotkeys {
  406.     char key;
  407.     int objnum;
  408. } HOTKEYS;
  409.  
  410. /* These are the high resolution and low resolution images */
  411. typedef struct image
  412. {
  413.     int        *hi_on, *hi_off, *lo_on, *lo_off;
  414. } IMAGE;
  415.  
  416. typedef struct images
  417. {
  418.     int        count;
  419.     IMAGE    *image;
  420. } IMAGES;
  421.  
  422. typedef struct timer
  423. {
  424.     long    clock;
  425.     long    ev_mtcount;                    /* Timer counter */
  426.     void    *user;                        /* User parameters to give Dispatcher routine */
  427.     int        status;                        /* Status of timer */
  428. } TIMER;
  429.  
  430. typedef struct window
  431. {
  432.     int                handle;                /* Handle of window */
  433.     int                state;                /* Current state of window */
  434.     int                style;                /* Extended states (style) for window */
  435.     int                kind;                /* Visual attributes of window */
  436.     int                dominance;            /* How dominant the W_UNUNTOPPABLE setting is */
  437.     GRECT            size;
  438.     char            title[128], info[128], origtitle[128];
  439.                                         /* Title, info and original (untouched) title for window */
  440.     struct window    *prev, *next;        /* Pointer to previous and next window in chain */
  441.     OBJECT            *menubar;            /* Menu bar */
  442.     OBJECT            *tree;                /* Pointer to resource tree */
  443.     int                treenumber;            /* Tree number of the found resource */
  444.     int                edobject, edpos;    /* First editable field in resource tree, and position of cursor */
  445.     BOOL            has_edit;            /* Does the dialog box have an editable object? */
  446.     BOOL            edit_disp;            /* Editing cursor displayed flag */
  447.     int                slidpos[10],slidmax[10];    /* Position and maximum position of sliders at any given time */
  448.     long            slidacc[10],slidstep[10];    /* Slider accumulator and step accumulator for the slider routine */
  449.     void            *WndDispatcher;        /* Dispatcher procedures for window */
  450.     void            *user;                /* User parameters to give Dispatcher routines */
  451.     int                popups[20];            /* These are the selections that have been clicked for your popups. */
  452.     HOTKEYS            hot_keys[20];        /* Hotkey (dialog) information */
  453.     HOTKEYS            hot_text[20];        /* Hotkey (text) information */
  454.     int                objnumber;            /* Iconified window object number */
  455.     TIMER            timer;                /* Timer information */
  456. } WINDOW;
  457.  
  458. typedef struct extinfo
  459. {
  460.     char    *te_ptext;         /* Pointer to text string           */
  461.     char    *te_ptmplt;        /* Pointer to text template         */
  462.     char    *te_pvalid;        /* Pointer to validation string     */
  463.     int     te_font;           /* Font size                        */
  464.     int     te_junk1;          /* Unused                           */
  465.     int     te_just;           /* Text justification               */
  466.     struct
  467.     {
  468.         unsigned int bord_color        : 4;
  469.         unsigned int text_color        : 4;
  470.         unsigned int transparency    : 1;
  471.         unsigned int fill_ptn        : 3;
  472.         unsigned int in_color        : 4;
  473.     }        te_color;          /* Color                            */
  474.     int     te_junk2;
  475.     int     te_thickness;      /* Border thickness                 */
  476.     char    te_character, nullterm;
  477.     int     te_txtlen;         /* Text length                      */
  478.     int     te_tmplen;         /* Length of template               */
  479.     void    *oldparm;
  480.     int        oldtype;
  481. } EXTINFO;
  482.  
  483. typedef struct extended_rshdr
  484. {
  485.     unsigned int rsh_vrsn;        /* should be 3                                 */
  486.     unsigned int rsh_extvrsn;    /* not used, initialised to 'IN' for Interface */
  487.     unsigned long rsh_object;
  488.     unsigned long rsh_tedinfo;
  489.     unsigned long rsh_iconblk;    /* list of ICONBLKS                 */
  490.     unsigned long rsh_bitblk;
  491.     unsigned long rsh_frstr;
  492.     unsigned long rsh_string;
  493.     unsigned long rsh_imdata;    /* image data                     */
  494.     unsigned long rsh_frimg;
  495.     unsigned long rsh_trindex;
  496.     unsigned long rsh_nobs;        /* counts of various structs          */
  497.     unsigned long rsh_ntree;
  498.     unsigned long rsh_nted;
  499.     unsigned long rsh_nib;
  500.     unsigned long rsh_nbb;
  501.     unsigned long rsh_nstring;
  502.     unsigned long rsh_nimages;
  503.     unsigned long rsh_rssize;    /* total bytes in resource   */
  504. } RSXHDR;
  505.  
  506. typedef struct applinfo
  507. {
  508.     /* Standard messages */
  509.     int    resnum;            /* Current resolution */
  510.     int colsup;            /* Number of colors supported */
  511.     int    colicons;        /* Color icons supported */
  512.     int newrsc;            /* New resource file supported */
  513.     int langidx;        /* Language index */
  514.     int multitask;        /* Preemptive multitasking */
  515.     int extndapfind;    /* Extended ap_find */
  516.     int    applsrch;        /* Appl_search */
  517.     int rcfix;            /* rsrc_rcfix */
  518.     int objcxfind;        /* objc_xfind */
  519.     int menuclick;        /* menu_click */
  520.     int shel_w_r;        /* shel_write/shel_read */
  521.     int applread;        /* appl_read(-1) */
  522.     int    shelget;        /* shel_get(-1) */
  523.     int mbar1;            /* menu_bar(-1) */
  524.     int mbar2;            /* menu_bar(MENU_INSTL) */
  525.     int gmouse;            /* graf_mouse(258-260) */
  526.     int osmouse;        /* Mouse maintained by OS */
  527.     int submnus;        /* Submenus supported */
  528.     int popupmnus;        /* Popup menus supported */
  529.     int scrollable;        /* Scrollable menus supported */
  530.     int exmnsel;        /* Extended MN_SELECTED */
  531.     int wf_support;        /* Extended WF_ support */
  532.     int wf_gadgets;        /* New window gadget support */
  533.     int extra_msgs;        /* Extra messages supported */
  534.     int msgbitfld;        /* Bitfield of extra messages supported */
  535.     int msg_behavior;    /* Message behavior */
  536.     int obj3d;            /* 3D Objects supported */
  537.     int sysvar;            /* objc_sysvar */
  538.     int tedinfofonts;    /* Fonts in TEDINFO structures */
  539.     int fldial;            /* Flying dialogs supported */
  540.     int magix;            /* Mag!x keyboard conversion tables */
  541.     int cpret;            /* Cursor position always returned */
  542.  
  543.     /* WinLIB Standard messages */
  544.     int    wlver;            /* Current version of WinLIB PRO */
  545. } APINFO;
  546.  
  547. typedef struct mouseforms
  548. {
  549.     int    forms[16];
  550. } MICE;
  551.  
  552. typedef struct
  553. {
  554.     long cookie_id;        /* Cookie ID number */
  555.     long cookie_value;    /* Points to your cookie data */
  556. } COOKIE;
  557.  
  558. typedef struct
  559. {
  560.     unsigned long magic;    /* Installed magic */
  561.  
  562. /*    struct {
  563.         unsigned long magic;        /* 3D Installed magic number */
  564.         BOOL mtlook;    /* MultiTOS look */
  565.         BOOL zoomlook;    /* Zoom! look */
  566.         BOOL motiflook;    /* Motif (X11R5) look */
  567.         BOOL genlook;    /* Geneva look */
  568.         BOOL winlook;    /* WinLIB PRO look */
  569.         int     def_low;    /* 16+ colors default look */
  570.         int     def_high;    /* >=4 colors default look */
  571.     } draw3d;
  572.  
  573.     unsigned long textmagic;        /* Text windows magic number */
  574.  
  575.     struct {
  576.         unsigned long magic;        /* Custom desktop menus magic number */
  577.         BOOL sideroot;    /* Side rooted menus supported */
  578.         BOOL scrolling;    /* Scrollable menus supported */
  579.         BOOL popup;        /* Popup menus supported */
  580.         BOOL dropdown;    /* Dropdown menus supported */
  581.         BOOL draw3d;    /* 3D menus (desktop) supported */
  582.         int  style;        /* Popup or dropdown flag (if supported) */
  583.     } custmenu;
  584.  
  585.     struct {
  586.         unsigned long magic;        /* Custom desktop routines magic number */
  587.         BOOL pictures;    /* Desktop picture support */
  588.         BOOL iconmouse;    /* Iconic mouse support */
  589.         BOOL multidrag;    /* Multiple icon dragging support */
  590.         BOOL dragdrop;    /* Drag-and-drop support */
  591.         BOOL icon_mf;    /* Flag using mouse change or ghost rect */
  592.     } deskrouts;
  593.  
  594.     unsigned long xaes_vdimagic;    /* XAES and XVDI routines */
  595.  
  596.     struct {
  597.         unsigned long magic;        /* Custom resource routines magic number */
  598.         BOOL largefile;    /* >64K file size support */
  599.         BOOL autofix;    /* Automatic EObT fix support */
  600.     } resource;
  601.  
  602.     unsigned long clipbrd_magic;    /* Clipboard management routines */ */
  603. } PROGCOOKIE;
  604.  
  605. typedef struct winlib_infocook
  606. {
  607.     int    v_winlib;
  608.     int v_xvdi;
  609.     int v_text;
  610.     int v_hotkey;
  611.     int v_hottext;
  612. } WLINFO;
  613.  
  614. /* header for rectangle buffers */
  615.  
  616. typedef struct {
  617.     long    magic;        /* Magic number to check if buffer installed */
  618.     int        vdihandle;    /* VDI Handle of buffer (= VDIhandle) */
  619.     int        pxy[8];        /* Point XY array for memory buffer */
  620.     MFDB    mfdb,scr;    /* Memory Form Definition Blocks of graphics */
  621.     char    data[];        /* Any extra data */
  622. } Buffer;
  623.  
  624. typedef struct {
  625.     char    *accname;    /* 8 character maximum accessory name */
  626.     int        acchandle;    /* Accessory Application ID */
  627.     int        accposition;/* Menubar position to call */
  628. } ACCS;
  629.  
  630. typedef struct {
  631.     int        textattributes[10];    /* Text saved attributes */
  632.     int        fillattributes[5];    /* Fill saved attributes */
  633.     int        lineattributes[6];    /* Line saved attributes */
  634. } XVDIVARS;
  635.  
  636. extern    int        VDIhandle, hotkeylevel, buttonlevel, PopupVDIhandle;
  637. extern    int        hottextlevel, ColSupported, Life, Return, Ap_ID;
  638. extern    int        gr_cw, gr_ch, gr_bw, gr_bh, small_font, large_font;
  639. extern    int        color_font, image_w, image_h, big_img, num_colors;
  640. extern    int        num_planes, draw3dtype, cur_mouse, cur_mouse_form;
  641. extern    int        rsrc_array[15], pglobal[15], *rs_global, rsrc_objects;
  642. extern    int        rsrc_trees, TempVDIhandle, AEShandle;
  643. extern    char    *prgnameheader, *desk_accessories[6];
  644. extern    void    *_MainDispatcher, *_MainKeyDispatcher, *dpbuffer;
  645. extern    void    *dialbuffer, *winbuffer;
  646. extern    ACCS    Accessories[6];
  647. extern    BOOL    DesktopInstalled, MenusShown;
  648. extern    MFDB    screen;
  649. extern    MICE    mouseform;
  650. extern    GRECT    desk;
  651. extern    APINFO    globapinfo;
  652. extern    OBJECT    *MYALERT, *desktop, *iconpopup, *COMLINEELEMENT;
  653. extern    OBJECT    *wl_menubar, *WINELEM, *INTERNALMENU;
  654. extern    WINDOW    *WindowChain;
  655. extern    RSXHDR     *rs_hdr, hdr_buf;
  656. extern    COOKIE    *MainCJar;
  657. extern    XVDIVARS SaveHandles;
  658.  
  659. /* External function bindings, used in all modules.  This list is in
  660.    alphabetical order; it makes more sense. */
  661.  
  662. int        ___DialEditDispatcher(WINDOW *win, int msg_buf[8]);
  663. int        ___EditOptionDispatcher(WINDOW *win, int msg_buf[8]);
  664. int        ___ExtOptionDispatcher(WINDOW *win, int msg_buf[8]);
  665. int        ___ExtendedDispatcher(WINDOW *win, int msg_buf[8]);
  666. int        ___MainHelpDispatcher(WINDOW *win, int msg_buf[8]);
  667. int        ___MainOptionDispatcher(WINDOW *win, int msg_buf[8]);
  668.  
  669. void    box(int x, int y, int w, int h, int color);
  670. void    box_fill(int x, int y, int w, int h, int color);
  671. long    cookie_size();
  672. void    create_cookie(COOKIE *cookie, long id, long value);
  673. void    ddclose(int fd);
  674. int        ddcreate(int apid, int winid, int msx, int msy, int kstate, char exts[]);
  675. int        ddopen(int ddnam, char *preferext);
  676. int        ddreply(int fd, int ack);
  677. int        ddrtry(int fd, char *name, char *whichext, long *size);
  678. int        ddstry(int fd, char *ext, char *name, long size);
  679. int        dodialog(int vdihandle, OBJECT *tree, int skeleton, int outside);
  680. void    domenu(WINDOW *win);
  681. void    edit_off(WINDOW *win);
  682. void    edit_on(WINDOW *win);
  683. void    edit_pos(WINDOW *win, int where);
  684. void    enddialog(OBJECT *tree);
  685. void    fill(int x, int y, int color);
  686. void    fillarea(int x1, int y1, int x2, int y2, int interior, int color);
  687. COOKIE    *find_cookie(long id);
  688. int        find_position(OBJECT *obj, int No, int mx);
  689. int        fix_object(OBJECT *obj, int sizefix);
  690. int        get_cookie(long cookie, long *value);
  691. long    *get_cookiejar();
  692. void    init_images(void);
  693. void    init_mfdb(MFDB *fm, int *adr, int w, int h, int st, int pl);
  694. void    line(int x1, int y1, int x2, int y2);
  695. int        locate_object(WINDOW *win, char key);
  696. void    move_cookiejar(long *dest, long size);
  697. int        new_cookie(COOKIE *ent);
  698. void    no_click(void);
  699. void    point(int x, int y, int color);
  700. void    position_fix(OBJECT *obj);
  701. int        rc_intersect(GRECT *r1, GRECT *r2);
  702. int        rc_inside(int x, int y, GRECT *r);
  703. void    remove_cookie(long cookie_id);
  704. void    reset_vdi(void);
  705. void    restore_clip(void);
  706. void    scale_image(OBJECT *obj, int mode);
  707. void    scale_img(int *src, int w, int h, int mode, int *b_w, int *b_h);
  708. void    *scrmove(void *buffer, int nx, int ny);
  709. void    scrp_clear(void);
  710. int        scrp_find(char *extension, char *filename);
  711. int        scrp_init(char *path);
  712. int        scrp_length(void);
  713. void    scrrestore(void *buffer);
  714. void    *scrsave(int vdihandle, int x, int y, int w, int h);
  715. void    set_hotkey(int keylevel);
  716. void    set_images(IMAGES *images, int **on, int **off);
  717. void    setup_hotkeys(WINDOW *win);
  718. void    showdialog(OBJECT *tree);
  719. void    trans_image(OBJECT *obj);
  720. void    unfix_object(OBJECT *obj);
  721. void    vdi_trans(int w, int h, void *data);
  722. void    vrt_copy(int *image, PARMBLK *pb, int color, int selected);
  723. int        xrsrc_free(void);
  724. int        xrsrc_gaddr(int re_gtype, int re_gindex, void *re_gaddr);
  725. int        xrsrc_load(const signed char *re_lpfname);
  726. int        xrsrc_obfix(OBJECT *re_otree, int re_oobject);
  727. int        xrsrc_saddr(int re_stype, int re_sindex, void *re_saddr);
  728.  
  729. int        AlertDispatcher(WINDOW *win, int msg_buf[]);
  730. int        CallControlPanel(OBJECT *menu_addr);
  731. void    CallInternalHelp(void);
  732. void    Change3DType(int type);
  733. void    ChangeObjectText(OBJECT *obj, int idx, char *txt, int fnt, int just);
  734. void    DoDeskMenu(OBJECT *menu);
  735. void    DoHorizontalSlide(WINDOW *win, int number, int trackix,
  736.                     int slidix, int leftix, int rightix, int whichix,
  737.                     int trakstep, int strtrack);
  738. void    DoVerticalSlide(WINDOW *win, int number, int trackix,
  739.                     int slidix, int upix, int downix, int whichix,
  740.                     int trakstep, int strtrack);
  741. void    FixColIcon(ICONBLK *iconBlk,int planes,short *sData,
  742.                     short *sMask,short *dData,short *dMask,
  743.                     short *dtData,short *dtMask,short *cnvTab);
  744. int        HoldSelection(void);
  745. void    HorizontalSlideReset(WINDOW *win, int number, int maximum, int initial,
  746.                     int trackix, int slidix, int strtrack, int redraw);
  747. void    InitCookies(void);
  748. void    LockScreenUpdate(void);
  749. void    Objc_Change(OBJECT *tree, int ob_cobject, int ob_crecvd, int ob_cnewstate, int ob_credraw);
  750. int        PDoPopup(WINDOW *win, int index, OBJECT *menu_addr, int show, int x, int y, int w, int h);
  751. int        PDoPopupAddr(OBJECT *tree);
  752. int        PDoPopupDeskMenu(OBJECT *index, int *retbtn);
  753. void    PDropdown_DialXY(OBJECT *srctree, int srcindex, OBJECT *desttree);
  754. void    PDropdown_WinXY(WINDOW *win, int srcindex, OBJECT *desttree);
  755. int        PEndPopupDesk(OBJECT *index);
  756. void    PMovePopup(OBJECT *dial, int oldpos, int newpos);
  757. void    PMovePopup_WinXY(WINDOW *win, int pindex, OBJECT *desttree);
  758. void    PMovePopupCoord(OBJECT *desttree, int x, int y);
  759. int        POpenPopupWorkspace(void);
  760. void    PPopup_DialXY(OBJECT *srctree, int srcindex, OBJECT *desttree);
  761. void    PPopup_WinXY(WINDOW *win, int srcindex, OBJECT *desttree);
  762. int        PShowPopupDesk(OBJECT *index);
  763. void    RFix_ObjectPos(OBJECT *obj);
  764. int        Rsrc_Free(void);
  765. void    TChangeTitleText(char *text);
  766. void    TEndTitle(void);
  767. void    TInitTitle(void);
  768. void    TShowTitle(void);
  769. void    UnlockScreenUpdate(void);
  770. void    VerticalSlideReset(WINDOW *win, int number, int maximum, int initial,
  771.                     int slidix, int trackix, int strtrack, int redraw);
  772. int        WAppl_GetInfo(int ap_gtype, int *ap_gout1, int *ap_gout2, int *ap_gout3, int *ap_gout4);
  773. void    WAppl_SetupInfo();
  774. int        WAscii_Table();
  775. void    WCallAccessory(int buffernum);
  776. int        WCallAlertDispatcher(WINDOW *win, int alexit, int alnumber);
  777. int        WCallBtnDispatcher(WINDOW *win, int mx, int my, int button, int kstate, int bclicks);
  778. int        WCallDlgDispatcher(WINDOW *win, int message);
  779. int        WCallEtcDispatcher(int msg_buf[]);
  780. int        WCallFKeyDispatcher(WINDOW *win, int fkeynum);
  781. int        WCallHelpDispatcher(WINDOW *win);
  782. int        WCallHotkeyDispatcher(WINDOW *win, int key, int objnum);
  783. int        WCallIconifyDispatcher(WINDOW *win, int mode);
  784. int        WCallKeyDispatcher(int key);
  785. int        WCallResetDispatcher(WINDOW *win, int mode);
  786. int        WCallStartupDispatcher(void);
  787. int        WCallTMDDispatcher(WINDOW *win, int mode);
  788. int        WCallTmrDispatcher(WINDOW *win);
  789. int        WCallTxtDispatcher(WINDOW *win, int message);
  790. int        WCallUndoDispatcher(WINDOW *win);
  791. int        WCallWKeyDispatcher(WINDOW *win, int key);
  792. int        WCallWndDispatcher(WINDOW *win, int msg_buf[]);
  793. void    WCruelCloseWindow(WINDOW *win, BOOL icon);
  794. void    WCloseWindow(WINDOW *win, int message);
  795. void    WCreateTimer(WINDOW *win, int status, long ev_tcount, void *user);
  796. WINDOW    *WCreateWindow(int state, int style, int kind,
  797.                         char *title, char *info,
  798.                         int object, int edobject,
  799.                         int menubar,
  800.                         int WndDispatcher(WINDOW *, int[]),
  801.                         void *user,
  802.                         int x, int y, int w, int h,
  803.                         OBJECT *obj, int dominance);
  804. void    WDesk_ForceRedrawPortion(int x, int y, int w, int h);
  805. void    WDesk_PortionRedraw(int object, int x, int y, int w, int h);
  806. void    WDesk_Redraw(void);
  807. void    WDesk_RedrawPortion(int x, int y, int w, int h);
  808. void    WDo_Desk(int object, int initialclicks, int mouseforms);
  809. void    DoDeskMenu(OBJECT *menu);
  810. int        WDoDial(OBJECT *menu);
  811. void    WDoElements(WINDOW *win, int obj);
  812. void    WDie(int returns);
  813. void    WDragBox(int width, int height, int beginx, int beginy,
  814.                 int boundx, int boundy, int boundw, int boundh,
  815.                 int linecolor, int linetype, int linepattern,
  816.                 int *endx, int *endy, int animate);
  817. int        WDragBoxDesk(int object, int width, int height, int beginx, int beginy,
  818.                 int boundx, int boundy, int boundw, int boundh,
  819.                 int linecolor, int linetype, int linepattern,
  820.                 int *endx, int *endy, int animate, int mouseform);
  821. BOOL    WFindAnyOpen(void);
  822. int        WFindDominance(void);
  823. WINDOW    *WFindIconWindow(int object);
  824. int        WFindText(WINDOW *win, int mx, int my);
  825. int        WFindUntoppables(void);
  826. BOOL    WFindWindow(int treenumber);
  827. int        WForm_button(WINDOW *win, int obj, int clicks, int *nxtobj);
  828. int        WForm_keybd(WINDOW *win, int key, int kstate, int *nobj, int *nchr);
  829. int        WFormCustAlert(int icn, char *text1, char *at1, char *at2, char *at3, char *at4, char *at5,
  830.                         char *bt1, char *bt2, char *bt3);
  831. void    WGet_CInfo(int *wlv, int *xvv, int *txv, int *hkv, int *htv);
  832. void    WGraf_Rubberbox(int bx, int by, int linecolor, int linetype, int linepattern,
  833.                 int *endx, int *endy, int animate);
  834. int        WGrafMouse(int mo_sfield, ...);
  835. void    WHotkeyLevel(int mode);
  836. void    WHottextStyle(int style);
  837. void    WIconify(WINDOW *win);
  838. int        WInit(int ap_id, int *work_out,
  839.                 int DeskWndDispatcher(WINDOW *, int[]),
  840.                 int MainDispatcher(int[]),
  841.                 int KeyDispatcher(int),
  842.                 char *prgname, char *header, int dsk);
  843. void    WInitAlert(void);
  844. void    WInitAscii(void);
  845. void    WInitElements(void);
  846. void    WInitProcesses(void);
  847. int        WIsTopped(int handle);
  848. WINDOW *WLocateWindow(long ident, ...);
  849. void    WKillWindow(WINDOW *win);
  850. void    WKillAllWindows(void);
  851. void    WMoveWindow(WINDOW *win, int x, int y, int w, int h);
  852. void    WMenuAttach(OBJECT *menubar, int menuitem, int popupobj, BOOL attach);
  853. int        WMenuBar(OBJECT *me_btree, int me_bshow);
  854. void    WMsgWindow(WINDOW *win, int msg_buf[]);
  855. void    WObjc_Change(OBJECT *tree, int ob_cobject, int ob_crecvd, int ob_cnewstate, int ob_credraw);
  856. void    WObjc_Draw(OBJECT *tree, int ob_cobject, int ob_cdepth, int clipx, int clipy, int clipw, int cliph);
  857. int        WOpenWindow(WINDOW *win);
  858. void    WReassignWindow(WINDOW *win,
  859.                         int state, int kind, char *title, char *info,
  860.                         int object, int edobject, int edpos,
  861.                         int menubar, int WndDispatcher(WINDOW *, int[]),
  862.                         void *user, int w, int h,
  863.                         OBJECT *obj, char textarray[], int redraw);
  864. void    WRedrawAllWindows(void);
  865. void    WRedrawWindow(WINDOW *win, int x, int y, int w, int h);
  866. int        WRemove_Icon(int ic, int drag);
  867. void    WScrollText(WINDOW *ws);
  868. void    WSend_Msg(int sendto, int msg0, char *msg3, int msg5, int msg6, int msg7);
  869. void    WSetup_Desktop(void);
  870. void    WSetupText(WINDOW *win, int xd, int yd, int wd, int hd);
  871. void    WStartTimer(WINDOW *win);
  872. void    WStopTimer(WINDOW *win);
  873. void    WTerm(void);
  874. int        WTextAmount(WINDOW *win);
  875. void    WTextFix(WINDOW *win);
  876. void    WTextRedraw(WINDOW *win, int xd, int yd, int wd, int hd);
  877. TIMER    *WTimerStat(WINDOW *win);
  878. void    WTopWindow(WINDOW *win);
  879. void    WUpdateWindowDlg(WINDOW *win, int x, int y, int w, int h, int obj);
  880. void    WUpdateWindowMenu(WINDOW *win, int x, int y, int w, int h);
  881. void    WUseInternalAccs(int show);
  882. int        WWindGet(WINDOW *win, int wi_gfield, ...);
  883. int        WWindSet(WINDOW *win, int wi_sfield, ...);
  884. int        XVDI_NewTempVDIHandle(void);
  885. void    XVDI_DeleteVDIHandle(void);
  886.